package StudyCode.summary.zipfile;

import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetSpecifiedEntryFromZipFile {
	public static void main(String args[]) {
		try {
			ZipFile zipFile = new ZipFile("E:/Copy/1.zip");

			ZipEntry zipEntry = zipFile.getEntry("/2.txt");

			if (zipEntry != null)
				System.out.println("2.txt 在压缩文件未找到");
			else
				System.out.println("2.txt 在压缩文件已找到");

			zipFile.close();

		} catch (IOException ioe) {
			ioe.printStackTrace();
		}
	}
}
